﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class K8873
    {
        public K8873()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            InitializeComponent();
            SDSA = "8873";
        }
        public override void LOADALL()
        {
            base.LOADALL();
            if (SDSA.Length == 0) return;
            if (TBMain.Rows.Count > 0)
                return;
            if (DBSDDAT.ContainsKey(SDSA))
            {
                DBSDDAT.Remove(SDSA);
            }
            dwData = TBMain.NewRow();
            TMV.SetUpNewRow(ref dwData, SDSA);
            dwData["KEY"] = "GEW";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("机织");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("机织");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);

            dwData["KEY"] = "RAS";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("RAS");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("RAS");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);

            dwData["KEY"] = "TUF";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("簇绒");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("簇绒");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);

            dwData["KEY"] = "STR";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("纬编");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("纬编");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);

            dwData["KEY"] = "WIR";
            dwData["DES"] = Helpers.Helper.ConvertGB2312To8859P1("经编");
            dwData["SDES"] = Helpers.Helper.ConvertGB2312To8859P1("经编");
            dwData["VALUE"] = "000000000";
            TMV.Save(dwData);
            LOADALL();
        }
    }
}
